-
Notifications
You must be signed in to change notification settings - Fork 127
feat(ffi)!: do not panic in visit_scan_metadata #1526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(ffi)!: do not panic in visit_scan_metadata #1526
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1526 +/- ##
==========================================
- Coverage 84.77% 84.76% -0.01%
==========================================
Files 126 126
Lines 35679 35682 +3
Branches 35679 35682 +3
==========================================
Hits 30246 30246
- Misses 3965 3968 +3
Partials 1468 1468 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nicklan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break the examples so we'll need to fix those too.
nicklan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh, actually I see, it won't break them, but can we add a check that this succeeded in the examples, rather than just ignoring the result.
zachschuermann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, for breaking changes can we explicitly call out the breaking APIs? (really helps with changelogs/releasing) thank you!
| engine_context: NullableCvoid, | ||
| callback: CScanCallback, | ||
| ) { | ||
| ) -> ExternResult<NullableCvoid> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think visit_scan_files just returns its context. So I think we can either:
- return that here (like you have as
NullableCvoid) and add some docs and fix themapbelow OR - return
ExternResult<()>instead and just use it to propagate the error, expecting engines to keep their context pointer around (like it would have been used before).
thoughts @nicklan? I tend to lean toward the second option for now just in the name of simplicity?
What changes are proposed in this pull request?
Fixes #680
Avoid .unwrap() in
visit_scan_metadata, replace return parameter toExternResult<NullableCvoid>Usage example in C:
How was this change tested?
Running
read_table.cexample